import 'package:FiduMart/generated/json/base/json_convert_content.dart';
import 'package:FiduMart/core/network/model/cdn_game_entity.dart';
import 'package:FiduMart/core/utils/stringUtil.dart';


CdnGameEntity $CdnGameEntityFromJson(Map<String, dynamic> json) {
  final CdnGameEntity cdnGameEntity = CdnGameEntity();
  final int? id = jsonConvert.convert<int>(json['id']);
  if (id != null) {
    cdnGameEntity.id = id;
  }
  final String? address = jsonConvert.convert<String>(json['address']);
  if (address != null) {
    cdnGameEntity.address = address;
  }
  final String? h5Address = jsonConvert.convert<String>(json['h5_address']);
  if (h5Address != null) {
    cdnGameEntity.h5Address = h5Address;
  }
  final String? pictureZh = jsonConvert.convert<String>(json['pictureZh']);
  if (pictureZh != null) {
    cdnGameEntity.pictureZh = pictureZh;
  }
  final String? pictureEn = jsonConvert.convert<String>(json['pictureEn']);
  if (pictureEn != null) {
    cdnGameEntity.pictureEn = pictureEn;
  }
  final String? pictureTha = jsonConvert.convert<String>(json['pictureTha']);
  if (pictureTha != null) {
    cdnGameEntity.pictureTha = pictureTha;
  }
  final String? nameZh = jsonConvert.convert<String>(json['nameZh']);
  if (nameZh != null) {
    cdnGameEntity.nameZh = nameZh;
  }
  final String? nameEn = jsonConvert.convert<String>(json['nameEn']);
  if (nameEn != null) {
    cdnGameEntity.nameEn = nameEn;
  }
  final String? nameTha = jsonConvert.convert<String>(json['nameTha']);
  if (nameTha != null) {
    cdnGameEntity.nameTha = nameTha;
  }
  final int? needLogin = jsonConvert.convert<int>(json['Loginh5']);
  if (needLogin != null) {
    cdnGameEntity.needLogin = needLogin;
  }
  final int? titledisplay = jsonConvert.convert<int>(json['titledisplay']);
  if (titledisplay != null) {
    cdnGameEntity.titledisplay = titledisplay;
  }
  final String? apppicture = jsonConvert.convert<String>(json['apppicture']);
  if (apppicture != null) {
    cdnGameEntity.apppicture = apppicture;
  }
  final int? buttontype = jsonConvert.convert<int>(json['buttontype']);
  if (buttontype != null) {
    cdnGameEntity.buttontype = buttontype;
  }
  final String? buttonnameZh = jsonConvert.convert<String>(
      json['buttonnameZh']);
  if (buttonnameZh != null) {
    cdnGameEntity.buttonnameZh = buttonnameZh;
  }
  final String? buttonnameEn = jsonConvert.convert<String>(
      json['buttonnameEn']);
  if (buttonnameEn != null) {
    cdnGameEntity.buttonnameEn = buttonnameEn;
  }
  final String? buttonnameTha = jsonConvert.convert<String>(
      json['buttonnameTha']);
  if (buttonnameTha != null) {
    cdnGameEntity.buttonnameTha = buttonnameTha;
  }
  final String? feature_Zh = jsonConvert.convert<String>(json['feature_Zh']);
  if (feature_Zh != null) {
    cdnGameEntity.feature_Zh = feature_Zh;
  }
  final String? feature_En = jsonConvert.convert<String>(json['feature_En']);
  if (feature_En != null) {
    cdnGameEntity.feature_En = feature_En;
  }
  final String? feature_Tha = jsonConvert.convert<String>(json['feature_Tha']);
  if (feature_Tha != null) {
    cdnGameEntity.feature_Tha = feature_Tha;
  }
  final String? logo = jsonConvert.convert<String>(json['logo']);
  if (logo != null) {
    cdnGameEntity.logo = logo;
  }
  final String? vpicture = jsonConvert.convert<String>(json['vpicture']);
  if (vpicture != null) {
    cdnGameEntity.vpicture = vpicture;
  }
  final String? video = jsonConvert.convert<String>(json['video']);
  if (video != null) {
    cdnGameEntity.video = video;
  }
  return cdnGameEntity;
}

Map<String, dynamic> $CdnGameEntityToJson(CdnGameEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['id'] = entity.id;
  data['address'] = entity.address;
  data['h5_address'] = entity.h5Address;
  data['pictureZh'] = entity.pictureZh;
  data['pictureEn'] = entity.pictureEn;
  data['pictureTha'] = entity.pictureTha;
  data['nameZh'] = entity.nameZh;
  data['nameEn'] = entity.nameEn;
  data['nameTha'] = entity.nameTha;
  data['Loginh5'] = entity.needLogin;
  data['titledisplay'] = entity.titledisplay;
  data['apppicture'] = entity.apppicture;
  data['buttontype'] = entity.buttontype;
  data['buttonnameZh'] = entity.buttonnameZh;
  data['buttonnameEn'] = entity.buttonnameEn;
  data['buttonnameTha'] = entity.buttonnameTha;
  data['feature_Zh'] = entity.feature_Zh;
  data['feature_En'] = entity.feature_En;
  data['feature_Tha'] = entity.feature_Tha;
  data['logo'] = entity.logo;
  data['vpicture'] = entity.vpicture;
  data['video'] = entity.video;
  return data;
}

extension CdnGameEntityExt on CdnGameEntity {
  CdnGameEntity copyWith({
    int? id,
    String? address,
    String? h5Address,
    String? pictureZh,
    String? pictureEn,
    String? pictureTha,
    String? nameZh,
    String? nameEn,
    String? nameTha,
    int? needLogin,
    int? titledisplay,
    String? apppicture,
    int? buttontype,
    String? buttonnameZh,
    String? buttonnameEn,
    String? buttonnameTha,
    String? feature_Zh,
    String? feature_En,
    String? feature_Tha,
    String? logo,
    String? vpicture,
    String? video,
  }) {
    return CdnGameEntity()
      ..id = id ?? this.id
      ..address = address ?? this.address
      ..h5Address = h5Address ?? this.h5Address
      ..pictureZh = pictureZh ?? this.pictureZh
      ..pictureEn = pictureEn ?? this.pictureEn
      ..pictureTha = pictureTha ?? this.pictureTha
      ..nameZh = nameZh ?? this.nameZh
      ..nameEn = nameEn ?? this.nameEn
      ..nameTha = nameTha ?? this.nameTha
      ..needLogin = needLogin ?? this.needLogin
      ..titledisplay = titledisplay ?? this.titledisplay
      ..apppicture = apppicture ?? this.apppicture
      ..buttontype = buttontype ?? this.buttontype
      ..buttonnameZh = buttonnameZh ?? this.buttonnameZh
      ..buttonnameEn = buttonnameEn ?? this.buttonnameEn
      ..buttonnameTha = buttonnameTha ?? this.buttonnameTha
      ..feature_Zh = feature_Zh ?? this.feature_Zh
      ..feature_En = feature_En ?? this.feature_En
      ..feature_Tha = feature_Tha ?? this.feature_Tha
      ..logo = logo ?? this.logo
      ..vpicture = vpicture ?? this.vpicture
      ..video = video ?? this.video;
  }
}